import Layout from '@/layout/index.vue'

export default {
  path: '/work-manage',
  name: 'WorkManage',
  meta: { title: '作业管理' },
  component: Layout,
  children: [
    {
      path: 'work-tool',
      name: 'workTool',
      meta: {
        title: '作业工具',
        // componentName: 'playTool',
        // keepAlive: ['playToolDetails'],
      },
      component: () => import('@/views/work-manage/work-tool/index.vue'),
    },
    {
      path: 'work-tool-details',
      name: 'workToolDetails',
      meta: {
        title: '作业工具详情',
        componentName: 'workToolDetails',
        keepAlive: ['CreateConfigMaterial', 'CreateAnalyze'],
      },
      component: () => import('@/views/work-manage/work-tool/details.vue'),
    },
    {
      path: 'work-job',
      name: 'WorkJob',
      meta: {
        title: '作业任务',
        // componentName: 'PlayJob',
        // keepAlive: ['CreatePlayJob', 'CreateSchedule', 'PlayHistoryDetail'],
      },
      component: () => import('@/views/work-manage/work-job/index.vue'),
    },
    {
      path: 'work-history-pages',
      name: 'WorkHistoryPages',
      meta: {
        title: '作业任务执行历史',
        hidden: true,
        componentName: 'WorkHistoryPages',
        keepAlive: ['ExecuteHistoryDetail'],
      },
      component: () =>
        import('@/views/work-manage/work-job/workHistoryPages.vue'),
    },
    {
      path: 'create-work-job',
      name: 'CreateWorkJob',
      meta: {
        title: '编辑作业任务',
        componentName: 'CreateWorkJob',
        keepAlive: ['workToolDetails'],
      },
      component: () =>
        import('@/views/work-manage/work-job/component/CreateJob.vue'),
    },
    {
      path: 'work-schedule',
      name: 'WorkSchedule',
      meta: {
        title: '作业计划',
        // componentName: 'PlaySchedule',
        // keepAlive: ['CreateSchedule'],
      },
      component: () => import('@/views/work-manage/work-schedule/index.vue'),
    },
    {
      path: 'create-work-schedule',
      name: 'CreateWorkSchedule',
      meta: {
        title: '创建作业计划',
        hidden: true,
        componentName: 'CreateWorkSchedule',
        keepAlive: ['CreateWorkJob'],
      },
      component: () =>
        import(
          '@/views/work-manage/work-schedule/component/CreateSchedule.vue'
        ),
    },
    {
      path: 'work-job-history',
      name: 'WorkHistory',
      meta: {
        title: '执行批次历史',
        // componentName: 'PlayHistory',
        // keepAlive: ['PlayHistoryDetail'],
      },
      component: () => import('@/views/work-manage/work-history/index.vue'),
    },
    // {
    //   path: 'work-history-detail',
    //   name: 'WorkHistoryDetail',
    //   meta: { title: '作业历史详情' },
    //   component: () =>
    //     import('@/views/work-manage/work-history/HistoryDetail.vue'),
    // },
  ],
}
